<script setup>
// 引入naive-ui
import { NButton, NResult } from "naive-ui";

// 声明参数
const props = defineProps({
  error: Object,
});



// 返回主页事件
const handleError = () => clearError({ redirect: "/" });
</script>

<template>
  <div class="result">
    <n-result :status="String(error.statusCode)" :title="'错误提示'" :description="error.message">
      <template #footer>
        <n-button @click="handleError">返回主页</n-button>
      </template>
    </n-result>
  </div>
</template>


<style>
.result {
  @apply w-screen h-screen flex justify-center items-center;
}
</style>
